<%@ include file="/include/head.jsp"%>
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<html>
  <head>
    <title>test Clock</title>
    <script type="text/javascript">
    	Ext.onReady(function(){
<%--    		var updateClock = function(){--%>
<%--			    Ext.fly('clock').update(new Date().format('g:i:s A'));--%>
<%--			} --%>
<%--			var task = {--%>
<%--			    run: updateClock,--%>
<%--			    interval: 1000 //1 second--%>
<%--			}--%>
<%--			var runner = new Ext.util.TaskRunner();--%>
<%--			runner.start(task);--%>
			
			// equivalent using TaskMgr
			Ext.TaskMgr.start({
			    run: function(){
				    Ext.fly('clock').update(new Date().format('h:i:s'));
				},
			    interval: 1000
			});
    		
    	});
	</script>
  </head>
  
  <body>
	<div id="clock"></div>
  </body>
</html>
